package com.twu.biblioteca.option;

import com.twu.biblioteca.BibliotecaApp;
import com.twu.biblioteca.core.Option;
import com.twu.biblioteca.util.Cli;

public class MemberDetailsOption extends Option {
    private final BibliotecaApp app;

    public MemberDetailsOption(Cli cli, BibliotecaApp app) {
        super("Member Details", cli);
        this.app = app;
    }

    @Override
    public void execute() {
        if (app.isAlreadyLogin()) {
            cli.output(app.getCurrentUser().toString());
        } else {
            cli.output("Please talk to a Librarian. Thank you.");
        }
    }
}
